<!--
 * @Descripttion: 
 * @version: 
 * @Author: JiaLe
 * @Date: 2021-09-18 10:26:59
 * @LastEditors: went
 * @LastEditTime: 2023-06-01 11:47:51
-->

<template>
  <a-sub-menu :key="menuInfo.spyCode">
    <template #title>
      <svg-icon :icon-class="menuInfo.icon" :scale="1"></svg-icon>
      <span>{{ menuInfo.title }}</span>
    </template>
    <template v-for="item in menuInfo.children">
      <a-menu-item
        v-if="!item.children || item.children.length === 0"
        :key="item.spyCode"
        @click="() => $router.push({ name: item.name })"
      >
        <span style="margin-left: 10px">{{ item.title }}</span>
      </a-menu-item>
      <sub-menu v-else :key="`${item.spyCode}-${item.name}`" :menu-info="item" />
    </template>
  </a-sub-menu>
</template>
<script>
export default {
  name: "subMenu",
  props: ["menuInfo"],
  mounted() {
    console.log("props==========", this.props);
  },
};
</script>
<style scoped lang="less"></style>
